using System;
using System.Collections.Generic;
using System.Text;
using BTV.Base;

namespace BTV.Bleb
{
    public class BlebProgram : BTVProgram
    {
        private Dictionary<string, string> synopsis = new Dictionary<string, string>();

        public override void AddSynopsis(object a, object b)
        {
            string astr = a as string;
            string bstr = b as string;
            synopsis.Add(astr, bstr);
        }

        public override string GetLongSynopsis(bool tryShort)
        {
            string value = "";
            if (synopsis.TryGetValue("long", out value))
            {
                return value;
            }
            if (tryShort)
            {
                return GetShortSynopsis(false);
            }
            return "No Synopsis Available";
        }

        public override string GetShortSynopsis(bool tryLong)
        {
            string value = "";
            if (synopsis.TryGetValue("short", out value))
            {
                return value;
            }
            if (tryLong)
            {
                return GetLongSynopsis(false);
            }
            return "No Synopsis Available";
        }
    }
}
